<template>
    <div>
        <el-table
          :data="linkmanform"
          stripe
          style="width: 100%">
          <el-table-column
            label="联系人姓名"
            prop="name">
          </el-table-column>
          <el-table-column
            label="性别"
            width="180">
            <template slot-scope="scope">
              {{scope.row.sex==1?'男':'女'}}
            </template>
          </el-table-column>
          <el-table-column
            label="电话"
            prop="tel">
          </el-table-column>
          <el-table-column
            label="邮箱"
            prop="email">
          </el-table-column>
          <el-table-column
            label="职位"
            prop="position"
            width="180">
          </el-table-column>
        </el-table>
        <div class="dialog-footer" slot="footer">
          <el-button @click="tolist">返回</el-button>
        </div>
    </div>
</template>

<script>
    export default {
        name: "link",
      data() {
        return {
          linkmanform:[],
          id:null,
        }
      },
      methods:{
        tolist(){
          this.$router.push('/Customer');
        },
        getlinkman:function () {
          this.$http.post("/link/get/" + this.id).then((res) => {  //获取当前id
            this.linkmanform=res.data.result;
          })
        },

      },
      mounted(){

        this.id=this.$route.query.id;//$route
        this.getlinkman();
      }
    }
</script>

<style scoped>

</style>
